@extends('layouts.index')
@section('title','作品列表')
    @section('content')
<div class="main-container">
    <div class="account">
        @include('web.his.userInfo')

        <section class="related-cases span14" id="related-cases">
            <div class="related-cases__fill span2 hide-mobile"></div>
            <div class="related-cases__top span12 span14-mobile">
                <h2 class="related-cases__title"><!-- react-text: 1471 -->@lang('web.his_writing')</h2></div>
            <ul class="related-cases__case-holder span12 span14-mobile" id="load_more1">
            </ul>

            <a href="javascript:void(0)" onclick="load_more1()" class="related-cases__load-more span8 span100p-mobile pixel-pattern"><span class="span2 span4-mobile related-cases__load-more__arrow-holder"><span class="related-cases__load-more__arrow"></span></span>
                <!-- react-text: 7373 -->
                <font style="vertical-align: inherit;">
                    <font style="vertical-align: inherit;" id="load1">@lang('web.load_more')</font>
                </font>
                <!-- /react-text -->
            </a>
        </section>

    </div>
</div>{{--
<script type="text/javascript" src="{{asset('manger/plugins/layui2.0/layui.js')}}"></script>
        <script>
            layui.use('flow',function(){
                var $=layui.jquery;
                var flow=layui.flow;
                flow.load({
                    elem:'#flow',
                    isAuto:false,
                    done:function(page, next){
                        var lis=[];
                        $.get('{{route('get_more_writing')}}',{page:page},function(res){
                             lis.push(res);
                            next(lis.join(''),res>'');
                        })
                    }
                })
            });

        </script>--}}
<script>
    var page=1;
    var id={{$user->id}};
    function load_more1(){
        $.get('{{route('get_more_writing')}}',{page:page,id:id},function(data){
            if(data){
                page++;
                $("#load_more1").html($("#load_more1").html()+data);
            }else{
                $("#load1").html('@lang('web.no_more')');
            }
        });
    }
    load_more1();
</script>
        @endsection